# WidgetDef

ModelName: SRH-2D
WidgetName:
Sediment Size Class Cutoff (note: the size class is the table number minus 1 for the threshold particle size)_32


# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11) END FROM WidgetInst WHERE WidgetInstId = 11) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12) END FROM WidgetInst WHERE WidgetInstId = 12) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 11) END FROM WidgetInst WHERE WidgetInstId = 11) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 12) END FROM WidgetInst WHERE WidgetInstId = 12) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 26;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 2409) END FROM WidgetInst WHERE WidgetInstId = 2409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 2404) END FROM WidgetInst WHERE WidgetInstId = 2404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 2488) END FROM WidgetInst WHERE WidgetInstId = 2488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2498) END FROM WidgetInst WHERE WidgetInstId = 2498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 2501) END FROM WidgetInst WHERE WidgetInstId = 2501) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 2506) END FROM WidgetInst WHERE WidgetInstId = 2506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 2506) END FROM WidgetInst WHERE WidgetInstId = 2506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2498) END FROM WidgetInst WHERE WidgetInstId = 2498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2524;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2538;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2538;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2538;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2538;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2538;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2541) END FROM WidgetInst WHERE WidgetInstId = 2541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2558) END FROM WidgetInst WHERE WidgetInstId = 2558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2558) END FROM WidgetInst WHERE WidgetInstId = 2558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2567) END FROM WidgetInst WHERE WidgetInstId = 2567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2567) END FROM WidgetInst WHERE WidgetInstId = 2567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2567) END FROM WidgetInst WHERE WidgetInstId = 2567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2579) END FROM WidgetInst WHERE WidgetInstId = 2579)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2579) END FROM WidgetInst WHERE WidgetInstId = 2579)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2597) END FROM WidgetInst WHERE WidgetInstId = 2597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2597) END FROM WidgetInst WHERE WidgetInstId = 2597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2581) END FROM WidgetInst WHERE WidgetInstId = 2581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2642) END FROM WidgetInst WHERE WidgetInstId = 2642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2642) END FROM WidgetInst WHERE WidgetInstId = 2642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2642) END FROM WidgetInst WHERE WidgetInstId = 2642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2658) END FROM WidgetInst WHERE WidgetInstId = 2658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2658) END FROM WidgetInst WHERE WidgetInstId = 2658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2658) END FROM WidgetInst WHERE WidgetInstId = 2658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2678) END FROM WidgetInst WHERE WidgetInstId = 2678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2678) END FROM WidgetInst WHERE WidgetInstId = 2678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2678) END FROM WidgetInst WHERE WidgetInstId = 2678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2704) END FROM WidgetInst WHERE WidgetInstId = 2704) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2704) END FROM WidgetInst WHERE WidgetInstId = 2704) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2704) END FROM WidgetInst WHERE WidgetInstId = 2704) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2698) END FROM WidgetInst WHERE WidgetInstId = 2698)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2713) END FROM WidgetInst WHERE WidgetInstId = 2713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2713) END FROM WidgetInst WHERE WidgetInstId = 2713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2713) END FROM WidgetInst WHERE WidgetInstId = 2713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2713) END FROM WidgetInst WHERE WidgetInstId = 2713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2538) END FROM WidgetInst WHERE WidgetInstId = 2538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2737) END FROM WidgetInst WHERE WidgetInstId = 2737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2737) END FROM WidgetInst WHERE WidgetInstId = 2737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2737) END FROM WidgetInst WHERE WidgetInstId = 2737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2737) END FROM WidgetInst WHERE WidgetInstId = 2737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2759) END FROM WidgetInst WHERE WidgetInstId = 2759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2774) END FROM WidgetInst WHERE WidgetInstId = 2774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2775;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2792;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2793;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2794;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2796;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2797;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2797;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2797;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2797;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2797;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2813) END FROM WidgetInst WHERE WidgetInstId = 2813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2814) END FROM WidgetInst WHERE WidgetInstId = 2814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2815) END FROM WidgetInst WHERE WidgetInstId = 2815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2816) END FROM WidgetInst WHERE WidgetInstId = 2816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2817) END FROM WidgetInst WHERE WidgetInstId = 2817) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2818) END FROM WidgetInst WHERE WidgetInstId = 2818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2931) END FROM WidgetInst WHERE WidgetInstId = 2931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2932) END FROM WidgetInst WHERE WidgetInstId = 2932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2933) END FROM WidgetInst WHERE WidgetInstId = 2933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2934) END FROM WidgetInst WHERE WidgetInstId = 2934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2935) END FROM WidgetInst WHERE WidgetInstId = 2935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2936) END FROM WidgetInst WHERE WidgetInstId = 2936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2937) END FROM WidgetInst WHERE WidgetInstId = 2937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2931) END FROM WidgetInst WHERE WidgetInstId = 2931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2932) END FROM WidgetInst WHERE WidgetInstId = 2932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2933) END FROM WidgetInst WHERE WidgetInstId = 2933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2934) END FROM WidgetInst WHERE WidgetInstId = 2934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2935) END FROM WidgetInst WHERE WidgetInstId = 2935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2936) END FROM WidgetInst WHERE WidgetInstId = 2936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2937) END FROM WidgetInst WHERE WidgetInstId = 2937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2994) END FROM WidgetInst WHERE WidgetInstId = 2994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2995) END FROM WidgetInst WHERE WidgetInstId = 2995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2996) END FROM WidgetInst WHERE WidgetInstId = 2996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2997) END FROM WidgetInst WHERE WidgetInstId = 2997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2998) END FROM WidgetInst WHERE WidgetInstId = 2998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2999) END FROM WidgetInst WHERE WidgetInstId = 2999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3000) END FROM WidgetInst WHERE WidgetInstId = 3000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2994) END FROM WidgetInst WHERE WidgetInstId = 2994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2995) END FROM WidgetInst WHERE WidgetInstId = 2995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2996) END FROM WidgetInst WHERE WidgetInstId = 2996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2997) END FROM WidgetInst WHERE WidgetInstId = 2997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2998) END FROM WidgetInst WHERE WidgetInstId = 2998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2999) END FROM WidgetInst WHERE WidgetInstId = 2999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3000) END FROM WidgetInst WHERE WidgetInstId = 3000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2994) END FROM WidgetInst WHERE WidgetInstId = 2994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2995) END FROM WidgetInst WHERE WidgetInstId = 2995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2996) END FROM WidgetInst WHERE WidgetInstId = 2996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2997) END FROM WidgetInst WHERE WidgetInstId = 2997) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2998) END FROM WidgetInst WHERE WidgetInstId = 2998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2999) END FROM WidgetInst WHERE WidgetInstId = 2999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3000) END FROM WidgetInst WHERE WidgetInstId = 3000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3078) END FROM WidgetInst WHERE WidgetInstId = 3078)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3079) END FROM WidgetInst WHERE WidgetInstId = 3079)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3080) END FROM WidgetInst WHERE WidgetInstId = 3080)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3081) END FROM WidgetInst WHERE WidgetInstId = 3081)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3082) END FROM WidgetInst WHERE WidgetInstId = 3082)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3083) END FROM WidgetInst WHERE WidgetInstId = 3083)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3084) END FROM WidgetInst WHERE WidgetInstId = 3084)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3078) END FROM WidgetInst WHERE WidgetInstId = 3078)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3079) END FROM WidgetInst WHERE WidgetInstId = 3079)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3080) END FROM WidgetInst WHERE WidgetInstId = 3080)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3081) END FROM WidgetInst WHERE WidgetInstId = 3081)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3082) END FROM WidgetInst WHERE WidgetInstId = 3082)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3083) END FROM WidgetInst WHERE WidgetInstId = 3083)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3084) END FROM WidgetInst WHERE WidgetInstId = 3084)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3204) END FROM WidgetInst WHERE WidgetInstId = 3204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3205) END FROM WidgetInst WHERE WidgetInstId = 3205) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3206) END FROM WidgetInst WHERE WidgetInstId = 3206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3207) END FROM WidgetInst WHERE WidgetInstId = 3207) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3208) END FROM WidgetInst WHERE WidgetInstId = 3208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3209) END FROM WidgetInst WHERE WidgetInstId = 3209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3210) END FROM WidgetInst WHERE WidgetInstId = 3210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3204) END FROM WidgetInst WHERE WidgetInstId = 3204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3205) END FROM WidgetInst WHERE WidgetInstId = 3205) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3206) END FROM WidgetInst WHERE WidgetInstId = 3206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3207) END FROM WidgetInst WHERE WidgetInstId = 3207) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3208) END FROM WidgetInst WHERE WidgetInstId = 3208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3209) END FROM WidgetInst WHERE WidgetInstId = 3209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3210) END FROM WidgetInst WHERE WidgetInstId = 3210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3093) END FROM WidgetInst WHERE WidgetInstId = 3093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3094) END FROM WidgetInst WHERE WidgetInstId = 3094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3095) END FROM WidgetInst WHERE WidgetInstId = 3095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3096) END FROM WidgetInst WHERE WidgetInstId = 3096) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3097) END FROM WidgetInst WHERE WidgetInstId = 3097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3098) END FROM WidgetInst WHERE WidgetInstId = 3098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3519) END FROM WidgetInst WHERE WidgetInstId = 3519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3520) END FROM WidgetInst WHERE WidgetInstId = 3520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3521) END FROM WidgetInst WHERE WidgetInstId = 3521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3522) END FROM WidgetInst WHERE WidgetInstId = 3522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3523) END FROM WidgetInst WHERE WidgetInstId = 3523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3524) END FROM WidgetInst WHERE WidgetInstId = 3524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3525) END FROM WidgetInst WHERE WidgetInstId = 3525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3519) END FROM WidgetInst WHERE WidgetInstId = 3519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3520) END FROM WidgetInst WHERE WidgetInstId = 3520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3521) END FROM WidgetInst WHERE WidgetInstId = 3521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3522) END FROM WidgetInst WHERE WidgetInstId = 3522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3523) END FROM WidgetInst WHERE WidgetInstId = 3523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3524) END FROM WidgetInst WHERE WidgetInstId = 3524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3525) END FROM WidgetInst WHERE WidgetInstId = 3525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3519) END FROM WidgetInst WHERE WidgetInstId = 3519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3520) END FROM WidgetInst WHERE WidgetInstId = 3520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3521) END FROM WidgetInst WHERE WidgetInstId = 3521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3522) END FROM WidgetInst WHERE WidgetInstId = 3522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3523) END FROM WidgetInst WHERE WidgetInstId = 3523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3524) END FROM WidgetInst WHERE WidgetInstId = 3524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3525) END FROM WidgetInst WHERE WidgetInstId = 3525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3631) END FROM WidgetInst WHERE WidgetInstId = 3631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3632) END FROM WidgetInst WHERE WidgetInstId = 3632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3633) END FROM WidgetInst WHERE WidgetInstId = 3633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3634) END FROM WidgetInst WHERE WidgetInstId = 3634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3635) END FROM WidgetInst WHERE WidgetInstId = 3635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3636) END FROM WidgetInst WHERE WidgetInstId = 3636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3637) END FROM WidgetInst WHERE WidgetInstId = 3637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3631) END FROM WidgetInst WHERE WidgetInstId = 3631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3632) END FROM WidgetInst WHERE WidgetInstId = 3632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3633) END FROM WidgetInst WHERE WidgetInstId = 3633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3634) END FROM WidgetInst WHERE WidgetInstId = 3634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3635) END FROM WidgetInst WHERE WidgetInstId = 3635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3636) END FROM WidgetInst WHERE WidgetInstId = 3636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3637) END FROM WidgetInst WHERE WidgetInstId = 3637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3631) END FROM WidgetInst WHERE WidgetInstId = 3631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3632) END FROM WidgetInst WHERE WidgetInstId = 3632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3633) END FROM WidgetInst WHERE WidgetInstId = 3633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3634) END FROM WidgetInst WHERE WidgetInstId = 3634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3635) END FROM WidgetInst WHERE WidgetInstId = 3635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3636) END FROM WidgetInst WHERE WidgetInstId = 3636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3637) END FROM WidgetInst WHERE WidgetInstId = 3637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3773) END FROM WidgetInst WHERE WidgetInstId = 3773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3774) END FROM WidgetInst WHERE WidgetInstId = 3774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3775) END FROM WidgetInst WHERE WidgetInstId = 3775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3776) END FROM WidgetInst WHERE WidgetInstId = 3776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3777) END FROM WidgetInst WHERE WidgetInstId = 3777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3773) END FROM WidgetInst WHERE WidgetInstId = 3773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3774) END FROM WidgetInst WHERE WidgetInstId = 3774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3775) END FROM WidgetInst WHERE WidgetInstId = 3775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3776) END FROM WidgetInst WHERE WidgetInstId = 3776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3777) END FROM WidgetInst WHERE WidgetInstId = 3777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3773) END FROM WidgetInst WHERE WidgetInstId = 3773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3774) END FROM WidgetInst WHERE WidgetInstId = 3774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3775) END FROM WidgetInst WHERE WidgetInstId = 3775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3776) END FROM WidgetInst WHERE WidgetInstId = 3776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3777) END FROM WidgetInst WHERE WidgetInstId = 3777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3953) END FROM WidgetInst WHERE WidgetInstId = 3953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3954) END FROM WidgetInst WHERE WidgetInstId = 3954) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3955) END FROM WidgetInst WHERE WidgetInstId = 3955) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3956) END FROM WidgetInst WHERE WidgetInstId = 3956) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3957) END FROM WidgetInst WHERE WidgetInstId = 3957) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3958) END FROM WidgetInst WHERE WidgetInstId = 3958) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3959) END FROM WidgetInst WHERE WidgetInstId = 3959) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3953) END FROM WidgetInst WHERE WidgetInstId = 3953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3954) END FROM WidgetInst WHERE WidgetInstId = 3954) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3955) END FROM WidgetInst WHERE WidgetInstId = 3955) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3956) END FROM WidgetInst WHERE WidgetInstId = 3956) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3957) END FROM WidgetInst WHERE WidgetInstId = 3957) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3958) END FROM WidgetInst WHERE WidgetInstId = 3958) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3959) END FROM WidgetInst WHERE WidgetInstId = 3959) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3953) END FROM WidgetInst WHERE WidgetInstId = 3953) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3911) END FROM WidgetInst WHERE WidgetInstId = 3911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3954) END FROM WidgetInst WHERE WidgetInstId = 3954) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3912) END FROM WidgetInst WHERE WidgetInstId = 3912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3955) END FROM WidgetInst WHERE WidgetInstId = 3955) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3913) END FROM WidgetInst WHERE WidgetInstId = 3913)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3956) END FROM WidgetInst WHERE WidgetInstId = 3956) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3914) END FROM WidgetInst WHERE WidgetInstId = 3914)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3957) END FROM WidgetInst WHERE WidgetInstId = 3957) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3915) END FROM WidgetInst WHERE WidgetInstId = 3915)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3958) END FROM WidgetInst WHERE WidgetInstId = 3958) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3916) END FROM WidgetInst WHERE WidgetInstId = 3916)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3959) END FROM WidgetInst WHERE WidgetInstId = 3959) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3917) END FROM WidgetInst WHERE WidgetInstId = 3917)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4016) END FROM WidgetInst WHERE WidgetInstId = 4016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4017) END FROM WidgetInst WHERE WidgetInstId = 4017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4018) END FROM WidgetInst WHERE WidgetInstId = 4018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4019) END FROM WidgetInst WHERE WidgetInstId = 4019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4022) END FROM WidgetInst WHERE WidgetInstId = 4022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4016) END FROM WidgetInst WHERE WidgetInstId = 4016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4017) END FROM WidgetInst WHERE WidgetInstId = 4017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4018) END FROM WidgetInst WHERE WidgetInstId = 4018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4019) END FROM WidgetInst WHERE WidgetInstId = 4019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4022) END FROM WidgetInst WHERE WidgetInstId = 4022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4016) END FROM WidgetInst WHERE WidgetInstId = 4016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4017) END FROM WidgetInst WHERE WidgetInstId = 4017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4018) END FROM WidgetInst WHERE WidgetInstId = 4018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4019) END FROM WidgetInst WHERE WidgetInstId = 4019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4022) END FROM WidgetInst WHERE WidgetInstId = 4022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4016) END FROM WidgetInst WHERE WidgetInstId = 4016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4017) END FROM WidgetInst WHERE WidgetInstId = 4017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4018) END FROM WidgetInst WHERE WidgetInstId = 4018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4019) END FROM WidgetInst WHERE WidgetInstId = 4019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4022) END FROM WidgetInst WHERE WidgetInstId = 4022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4184) END FROM WidgetInst WHERE WidgetInstId = 4184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4185) END FROM WidgetInst WHERE WidgetInstId = 4185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4186) END FROM WidgetInst WHERE WidgetInstId = 4186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4187) END FROM WidgetInst WHERE WidgetInstId = 4187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4188) END FROM WidgetInst WHERE WidgetInstId = 4188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4189) END FROM WidgetInst WHERE WidgetInstId = 4189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4190) END FROM WidgetInst WHERE WidgetInstId = 4190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4184) END FROM WidgetInst WHERE WidgetInstId = 4184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4185) END FROM WidgetInst WHERE WidgetInstId = 4185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4186) END FROM WidgetInst WHERE WidgetInstId = 4186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4187) END FROM WidgetInst WHERE WidgetInstId = 4187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4188) END FROM WidgetInst WHERE WidgetInstId = 4188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4189) END FROM WidgetInst WHERE WidgetInstId = 4189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4190) END FROM WidgetInst WHERE WidgetInstId = 4190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4184) END FROM WidgetInst WHERE WidgetInstId = 4184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4185) END FROM WidgetInst WHERE WidgetInstId = 4185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4186) END FROM WidgetInst WHERE WidgetInstId = 4186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4187) END FROM WidgetInst WHERE WidgetInstId = 4187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4188) END FROM WidgetInst WHERE WidgetInstId = 4188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4189) END FROM WidgetInst WHERE WidgetInstId = 4189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4190) END FROM WidgetInst WHERE WidgetInstId = 4190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4184) END FROM WidgetInst WHERE WidgetInstId = 4184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4185) END FROM WidgetInst WHERE WidgetInstId = 4185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4186) END FROM WidgetInst WHERE WidgetInstId = 4186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4187) END FROM WidgetInst WHERE WidgetInstId = 4187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4188) END FROM WidgetInst WHERE WidgetInstId = 4188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4189) END FROM WidgetInst WHERE WidgetInstId = 4189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4190) END FROM WidgetInst WHERE WidgetInstId = 4190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4338) END FROM WidgetInst WHERE WidgetInstId = 4338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4339) END FROM WidgetInst WHERE WidgetInstId = 4339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4340) END FROM WidgetInst WHERE WidgetInstId = 4340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4341) END FROM WidgetInst WHERE WidgetInstId = 4341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4342) END FROM WidgetInst WHERE WidgetInstId = 4342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4343) END FROM WidgetInst WHERE WidgetInstId = 4343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4344) END FROM WidgetInst WHERE WidgetInstId = 4344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2791) END FROM WidgetInst WHERE WidgetInstId = 2791) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2792) END FROM WidgetInst WHERE WidgetInstId = 2792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2793) END FROM WidgetInst WHERE WidgetInstId = 2793) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2794) END FROM WidgetInst WHERE WidgetInstId = 2794) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2795) END FROM WidgetInst WHERE WidgetInstId = 2795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2796) END FROM WidgetInst WHERE WidgetInstId = 2796) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2797) END FROM WidgetInst WHERE WidgetInstId = 2797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4443) END FROM WidgetInst WHERE WidgetInstId = 4443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4444) END FROM WidgetInst WHERE WidgetInstId = 4444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4445) END FROM WidgetInst WHERE WidgetInstId = 4445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4446) END FROM WidgetInst WHERE WidgetInstId = 4446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4447) END FROM WidgetInst WHERE WidgetInstId = 4447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4448) END FROM WidgetInst WHERE WidgetInstId = 4448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4449) END FROM WidgetInst WHERE WidgetInstId = 4449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4456;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 4468;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 4469;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 4469;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 4469;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 4469;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 4469;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 4469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4474) END FROM WidgetInst WHERE WidgetInstId = 4474) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4475) END FROM WidgetInst WHERE WidgetInstId = 4475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2393) END FROM WidgetInst WHERE WidgetInstId = 2393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4508) END FROM WidgetInst WHERE WidgetInstId = 4508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4509) END FROM WidgetInst WHERE WidgetInstId = 4509) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4508) END FROM WidgetInst WHERE WidgetInstId = 4508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4509) END FROM WidgetInst WHERE WidgetInstId = 4509) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4526) END FROM WidgetInst WHERE WidgetInstId = 4526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4527) END FROM WidgetInst WHERE WidgetInstId = 4527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4526) END FROM WidgetInst WHERE WidgetInstId = 4526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4527) END FROM WidgetInst WHERE WidgetInstId = 4527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4526) END FROM WidgetInst WHERE WidgetInstId = 4526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4527) END FROM WidgetInst WHERE WidgetInstId = 4527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4550) END FROM WidgetInst WHERE WidgetInstId = 4550)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4551) END FROM WidgetInst WHERE WidgetInstId = 4551)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4550) END FROM WidgetInst WHERE WidgetInstId = 4550)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4551) END FROM WidgetInst WHERE WidgetInstId = 4551)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4586) END FROM WidgetInst WHERE WidgetInstId = 4586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4587) END FROM WidgetInst WHERE WidgetInstId = 4587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4586) END FROM WidgetInst WHERE WidgetInstId = 4586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4587) END FROM WidgetInst WHERE WidgetInstId = 4587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4554) END FROM WidgetInst WHERE WidgetInstId = 4554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4555) END FROM WidgetInst WHERE WidgetInstId = 4555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4676) END FROM WidgetInst WHERE WidgetInstId = 4676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4677) END FROM WidgetInst WHERE WidgetInstId = 4677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4676) END FROM WidgetInst WHERE WidgetInstId = 4676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4677) END FROM WidgetInst WHERE WidgetInstId = 4677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4676) END FROM WidgetInst WHERE WidgetInstId = 4676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4677) END FROM WidgetInst WHERE WidgetInstId = 4677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4708) END FROM WidgetInst WHERE WidgetInstId = 4708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4709) END FROM WidgetInst WHERE WidgetInstId = 4709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4708) END FROM WidgetInst WHERE WidgetInstId = 4708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4709) END FROM WidgetInst WHERE WidgetInstId = 4709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4708) END FROM WidgetInst WHERE WidgetInstId = 4708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4709) END FROM WidgetInst WHERE WidgetInstId = 4709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4748) END FROM WidgetInst WHERE WidgetInstId = 4748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4749) END FROM WidgetInst WHERE WidgetInstId = 4749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4748) END FROM WidgetInst WHERE WidgetInstId = 4748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4749) END FROM WidgetInst WHERE WidgetInstId = 4749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4748) END FROM WidgetInst WHERE WidgetInstId = 4748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4749) END FROM WidgetInst WHERE WidgetInstId = 4749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4800) END FROM WidgetInst WHERE WidgetInstId = 4800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4801) END FROM WidgetInst WHERE WidgetInstId = 4801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4800) END FROM WidgetInst WHERE WidgetInstId = 4800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4801) END FROM WidgetInst WHERE WidgetInstId = 4801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4800) END FROM WidgetInst WHERE WidgetInstId = 4800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4788) END FROM WidgetInst WHERE WidgetInstId = 4788)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4801) END FROM WidgetInst WHERE WidgetInstId = 4801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4789) END FROM WidgetInst WHERE WidgetInstId = 4789)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4819) END FROM WidgetInst WHERE WidgetInstId = 4819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4819) END FROM WidgetInst WHERE WidgetInstId = 4819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4819) END FROM WidgetInst WHERE WidgetInstId = 4819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4819) END FROM WidgetInst WHERE WidgetInstId = 4819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4866) END FROM WidgetInst WHERE WidgetInstId = 4866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4867) END FROM WidgetInst WHERE WidgetInstId = 4867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4866) END FROM WidgetInst WHERE WidgetInstId = 4866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4867) END FROM WidgetInst WHERE WidgetInstId = 4867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4866) END FROM WidgetInst WHERE WidgetInstId = 4866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4867) END FROM WidgetInst WHERE WidgetInstId = 4867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4866) END FROM WidgetInst WHERE WidgetInstId = 4866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4867) END FROM WidgetInst WHERE WidgetInstId = 4867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4910) END FROM WidgetInst WHERE WidgetInstId = 4910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4911) END FROM WidgetInst WHERE WidgetInstId = 4911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4468) END FROM WidgetInst WHERE WidgetInstId = 4468) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4469) END FROM WidgetInst WHERE WidgetInstId = 4469) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4940) END FROM WidgetInst WHERE WidgetInstId = 4940) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4941) END FROM WidgetInst WHERE WidgetInstId = 4941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 4998) END FROM WidgetInst WHERE WidgetInstId = 4998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4998) END FROM WidgetInst WHERE WidgetInstId = 4998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5011) END FROM WidgetInst WHERE WidgetInstId = 5011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5013) END FROM WidgetInst WHERE WidgetInstId = 5013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5006) END FROM WidgetInst WHERE WidgetInstId = 5006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 5090) END FROM WidgetInst WHERE WidgetInstId = 5090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5100) END FROM WidgetInst WHERE WidgetInstId = 5100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5103) END FROM WidgetInst WHERE WidgetInstId = 5103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5108) END FROM WidgetInst WHERE WidgetInstId = 5108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 5108) END FROM WidgetInst WHERE WidgetInstId = 5108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5100) END FROM WidgetInst WHERE WidgetInstId = 5100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5126;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5143) END FROM WidgetInst WHERE WidgetInstId = 5143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5169) END FROM WidgetInst WHERE WidgetInstId = 5169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5169) END FROM WidgetInst WHERE WidgetInstId = 5169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5169) END FROM WidgetInst WHERE WidgetInstId = 5169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5181) END FROM WidgetInst WHERE WidgetInstId = 5181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5181) END FROM WidgetInst WHERE WidgetInstId = 5181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5199) END FROM WidgetInst WHERE WidgetInstId = 5199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5199) END FROM WidgetInst WHERE WidgetInstId = 5199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5244) END FROM WidgetInst WHERE WidgetInstId = 5244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5244) END FROM WidgetInst WHERE WidgetInstId = 5244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5244) END FROM WidgetInst WHERE WidgetInstId = 5244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5260) END FROM WidgetInst WHERE WidgetInstId = 5260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5260) END FROM WidgetInst WHERE WidgetInstId = 5260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5260) END FROM WidgetInst WHERE WidgetInstId = 5260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5280) END FROM WidgetInst WHERE WidgetInstId = 5280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5280) END FROM WidgetInst WHERE WidgetInstId = 5280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5280) END FROM WidgetInst WHERE WidgetInstId = 5280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5300) END FROM WidgetInst WHERE WidgetInstId = 5300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5339) END FROM WidgetInst WHERE WidgetInstId = 5339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5339) END FROM WidgetInst WHERE WidgetInstId = 5339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5339) END FROM WidgetInst WHERE WidgetInstId = 5339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5339) END FROM WidgetInst WHERE WidgetInstId = 5339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5361) END FROM WidgetInst WHERE WidgetInstId = 5361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5376) END FROM WidgetInst WHERE WidgetInstId = 5376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5377;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5397;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5414) END FROM WidgetInst WHERE WidgetInstId = 5414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5415) END FROM WidgetInst WHERE WidgetInstId = 5415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5416) END FROM WidgetInst WHERE WidgetInstId = 5416) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5417) END FROM WidgetInst WHERE WidgetInstId = 5417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5418) END FROM WidgetInst WHERE WidgetInstId = 5418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5419) END FROM WidgetInst WHERE WidgetInstId = 5419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5420) END FROM WidgetInst WHERE WidgetInstId = 5420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4995) END FROM WidgetInst WHERE WidgetInstId = 4995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5533) END FROM WidgetInst WHERE WidgetInstId = 5533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5534) END FROM WidgetInst WHERE WidgetInstId = 5534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5535) END FROM WidgetInst WHERE WidgetInstId = 5535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5536) END FROM WidgetInst WHERE WidgetInstId = 5536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5537) END FROM WidgetInst WHERE WidgetInstId = 5537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5538) END FROM WidgetInst WHERE WidgetInstId = 5538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5539) END FROM WidgetInst WHERE WidgetInstId = 5539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5533) END FROM WidgetInst WHERE WidgetInstId = 5533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5534) END FROM WidgetInst WHERE WidgetInstId = 5534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5535) END FROM WidgetInst WHERE WidgetInstId = 5535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5536) END FROM WidgetInst WHERE WidgetInstId = 5536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5537) END FROM WidgetInst WHERE WidgetInstId = 5537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5538) END FROM WidgetInst WHERE WidgetInstId = 5538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5539) END FROM WidgetInst WHERE WidgetInstId = 5539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5596) END FROM WidgetInst WHERE WidgetInstId = 5596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5598) END FROM WidgetInst WHERE WidgetInstId = 5598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5599) END FROM WidgetInst WHERE WidgetInstId = 5599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5600) END FROM WidgetInst WHERE WidgetInstId = 5600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5601) END FROM WidgetInst WHERE WidgetInstId = 5601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5602) END FROM WidgetInst WHERE WidgetInstId = 5602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5596) END FROM WidgetInst WHERE WidgetInstId = 5596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5598) END FROM WidgetInst WHERE WidgetInstId = 5598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5599) END FROM WidgetInst WHERE WidgetInstId = 5599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5600) END FROM WidgetInst WHERE WidgetInstId = 5600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5601) END FROM WidgetInst WHERE WidgetInstId = 5601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5602) END FROM WidgetInst WHERE WidgetInstId = 5602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5596) END FROM WidgetInst WHERE WidgetInstId = 5596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5598) END FROM WidgetInst WHERE WidgetInstId = 5598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5599) END FROM WidgetInst WHERE WidgetInstId = 5599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5600) END FROM WidgetInst WHERE WidgetInstId = 5600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5601) END FROM WidgetInst WHERE WidgetInstId = 5601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5602) END FROM WidgetInst WHERE WidgetInstId = 5602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5680) END FROM WidgetInst WHERE WidgetInstId = 5680)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5681) END FROM WidgetInst WHERE WidgetInstId = 5681)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5682) END FROM WidgetInst WHERE WidgetInstId = 5682)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5683) END FROM WidgetInst WHERE WidgetInstId = 5683)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5684) END FROM WidgetInst WHERE WidgetInstId = 5684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5685) END FROM WidgetInst WHERE WidgetInstId = 5685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5686) END FROM WidgetInst WHERE WidgetInstId = 5686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5680) END FROM WidgetInst WHERE WidgetInstId = 5680)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5681) END FROM WidgetInst WHERE WidgetInstId = 5681)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5682) END FROM WidgetInst WHERE WidgetInstId = 5682)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5683) END FROM WidgetInst WHERE WidgetInstId = 5683)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5684) END FROM WidgetInst WHERE WidgetInstId = 5684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5685) END FROM WidgetInst WHERE WidgetInstId = 5685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5686) END FROM WidgetInst WHERE WidgetInstId = 5686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5806) END FROM WidgetInst WHERE WidgetInstId = 5806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5807) END FROM WidgetInst WHERE WidgetInstId = 5807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5808) END FROM WidgetInst WHERE WidgetInstId = 5808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5809) END FROM WidgetInst WHERE WidgetInstId = 5809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5810) END FROM WidgetInst WHERE WidgetInstId = 5810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5811) END FROM WidgetInst WHERE WidgetInstId = 5811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5812) END FROM WidgetInst WHERE WidgetInstId = 5812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5806) END FROM WidgetInst WHERE WidgetInstId = 5806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5807) END FROM WidgetInst WHERE WidgetInstId = 5807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5808) END FROM WidgetInst WHERE WidgetInstId = 5808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5809) END FROM WidgetInst WHERE WidgetInstId = 5809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5810) END FROM WidgetInst WHERE WidgetInstId = 5810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5811) END FROM WidgetInst WHERE WidgetInstId = 5811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5812) END FROM WidgetInst WHERE WidgetInstId = 5812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5694) END FROM WidgetInst WHERE WidgetInstId = 5694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5695) END FROM WidgetInst WHERE WidgetInstId = 5695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5696) END FROM WidgetInst WHERE WidgetInstId = 5696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5697) END FROM WidgetInst WHERE WidgetInstId = 5697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5699) END FROM WidgetInst WHERE WidgetInstId = 5699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5700) END FROM WidgetInst WHERE WidgetInstId = 5700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6121) END FROM WidgetInst WHERE WidgetInstId = 6121) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6122) END FROM WidgetInst WHERE WidgetInstId = 6122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6123) END FROM WidgetInst WHERE WidgetInstId = 6123) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6124) END FROM WidgetInst WHERE WidgetInstId = 6124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6125) END FROM WidgetInst WHERE WidgetInstId = 6125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6126) END FROM WidgetInst WHERE WidgetInstId = 6126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6127) END FROM WidgetInst WHERE WidgetInstId = 6127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6121) END FROM WidgetInst WHERE WidgetInstId = 6121) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6122) END FROM WidgetInst WHERE WidgetInstId = 6122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6123) END FROM WidgetInst WHERE WidgetInstId = 6123) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6124) END FROM WidgetInst WHERE WidgetInstId = 6124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6125) END FROM WidgetInst WHERE WidgetInstId = 6125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6126) END FROM WidgetInst WHERE WidgetInstId = 6126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6127) END FROM WidgetInst WHERE WidgetInstId = 6127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6121) END FROM WidgetInst WHERE WidgetInstId = 6121) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6122) END FROM WidgetInst WHERE WidgetInstId = 6122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6123) END FROM WidgetInst WHERE WidgetInstId = 6123) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6124) END FROM WidgetInst WHERE WidgetInstId = 6124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6125) END FROM WidgetInst WHERE WidgetInstId = 6125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6126) END FROM WidgetInst WHERE WidgetInstId = 6126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6127) END FROM WidgetInst WHERE WidgetInstId = 6127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6233) END FROM WidgetInst WHERE WidgetInstId = 6233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6234) END FROM WidgetInst WHERE WidgetInstId = 6234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6235) END FROM WidgetInst WHERE WidgetInstId = 6235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6236) END FROM WidgetInst WHERE WidgetInstId = 6236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6237) END FROM WidgetInst WHERE WidgetInstId = 6237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6238) END FROM WidgetInst WHERE WidgetInstId = 6238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6239) END FROM WidgetInst WHERE WidgetInstId = 6239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6233) END FROM WidgetInst WHERE WidgetInstId = 6233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6234) END FROM WidgetInst WHERE WidgetInstId = 6234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6235) END FROM WidgetInst WHERE WidgetInstId = 6235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6236) END FROM WidgetInst WHERE WidgetInstId = 6236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6237) END FROM WidgetInst WHERE WidgetInstId = 6237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6238) END FROM WidgetInst WHERE WidgetInstId = 6238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6239) END FROM WidgetInst WHERE WidgetInstId = 6239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6233) END FROM WidgetInst WHERE WidgetInstId = 6233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6234) END FROM WidgetInst WHERE WidgetInstId = 6234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6235) END FROM WidgetInst WHERE WidgetInstId = 6235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6236) END FROM WidgetInst WHERE WidgetInstId = 6236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6237) END FROM WidgetInst WHERE WidgetInstId = 6237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6238) END FROM WidgetInst WHERE WidgetInstId = 6238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6239) END FROM WidgetInst WHERE WidgetInstId = 6239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6373) END FROM WidgetInst WHERE WidgetInstId = 6373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6374) END FROM WidgetInst WHERE WidgetInstId = 6374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6375) END FROM WidgetInst WHERE WidgetInstId = 6375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6376) END FROM WidgetInst WHERE WidgetInstId = 6376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6377) END FROM WidgetInst WHERE WidgetInstId = 6377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6378) END FROM WidgetInst WHERE WidgetInstId = 6378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6379) END FROM WidgetInst WHERE WidgetInstId = 6379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6373) END FROM WidgetInst WHERE WidgetInstId = 6373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6374) END FROM WidgetInst WHERE WidgetInstId = 6374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6375) END FROM WidgetInst WHERE WidgetInstId = 6375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6376) END FROM WidgetInst WHERE WidgetInstId = 6376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6377) END FROM WidgetInst WHERE WidgetInstId = 6377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6378) END FROM WidgetInst WHERE WidgetInstId = 6378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6379) END FROM WidgetInst WHERE WidgetInstId = 6379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6373) END FROM WidgetInst WHERE WidgetInstId = 6373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6374) END FROM WidgetInst WHERE WidgetInstId = 6374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6375) END FROM WidgetInst WHERE WidgetInstId = 6375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6376) END FROM WidgetInst WHERE WidgetInstId = 6376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6377) END FROM WidgetInst WHERE WidgetInstId = 6377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6378) END FROM WidgetInst WHERE WidgetInstId = 6378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6379) END FROM WidgetInst WHERE WidgetInstId = 6379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6555) END FROM WidgetInst WHERE WidgetInstId = 6555) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6556) END FROM WidgetInst WHERE WidgetInstId = 6556) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6557) END FROM WidgetInst WHERE WidgetInstId = 6557) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6558) END FROM WidgetInst WHERE WidgetInstId = 6558) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6559) END FROM WidgetInst WHERE WidgetInstId = 6559) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6560) END FROM WidgetInst WHERE WidgetInstId = 6560) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6561) END FROM WidgetInst WHERE WidgetInstId = 6561) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6555) END FROM WidgetInst WHERE WidgetInstId = 6555) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6556) END FROM WidgetInst WHERE WidgetInstId = 6556) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6557) END FROM WidgetInst WHERE WidgetInstId = 6557) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6558) END FROM WidgetInst WHERE WidgetInstId = 6558) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6559) END FROM WidgetInst WHERE WidgetInstId = 6559) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6560) END FROM WidgetInst WHERE WidgetInstId = 6560) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6561) END FROM WidgetInst WHERE WidgetInstId = 6561) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6555) END FROM WidgetInst WHERE WidgetInstId = 6555) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6513) END FROM WidgetInst WHERE WidgetInstId = 6513)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6556) END FROM WidgetInst WHERE WidgetInstId = 6556) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6514) END FROM WidgetInst WHERE WidgetInstId = 6514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6557) END FROM WidgetInst WHERE WidgetInstId = 6557) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6515) END FROM WidgetInst WHERE WidgetInstId = 6515)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6558) END FROM WidgetInst WHERE WidgetInstId = 6558) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6516) END FROM WidgetInst WHERE WidgetInstId = 6516)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6559) END FROM WidgetInst WHERE WidgetInstId = 6559) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6517) END FROM WidgetInst WHERE WidgetInstId = 6517)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6560) END FROM WidgetInst WHERE WidgetInstId = 6560) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6518) END FROM WidgetInst WHERE WidgetInstId = 6518)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6561) END FROM WidgetInst WHERE WidgetInstId = 6561) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6519) END FROM WidgetInst WHERE WidgetInstId = 6519)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6618) END FROM WidgetInst WHERE WidgetInstId = 6618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6619) END FROM WidgetInst WHERE WidgetInstId = 6619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6620) END FROM WidgetInst WHERE WidgetInstId = 6620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6621) END FROM WidgetInst WHERE WidgetInstId = 6621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6622) END FROM WidgetInst WHERE WidgetInstId = 6622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6623) END FROM WidgetInst WHERE WidgetInstId = 6623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6624) END FROM WidgetInst WHERE WidgetInstId = 6624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6618) END FROM WidgetInst WHERE WidgetInstId = 6618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6619) END FROM WidgetInst WHERE WidgetInstId = 6619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6620) END FROM WidgetInst WHERE WidgetInstId = 6620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6621) END FROM WidgetInst WHERE WidgetInstId = 6621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6622) END FROM WidgetInst WHERE WidgetInstId = 6622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6623) END FROM WidgetInst WHERE WidgetInstId = 6623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6624) END FROM WidgetInst WHERE WidgetInstId = 6624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6618) END FROM WidgetInst WHERE WidgetInstId = 6618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6619) END FROM WidgetInst WHERE WidgetInstId = 6619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6620) END FROM WidgetInst WHERE WidgetInstId = 6620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6621) END FROM WidgetInst WHERE WidgetInstId = 6621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6622) END FROM WidgetInst WHERE WidgetInstId = 6622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6623) END FROM WidgetInst WHERE WidgetInstId = 6623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6624) END FROM WidgetInst WHERE WidgetInstId = 6624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6618) END FROM WidgetInst WHERE WidgetInstId = 6618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6619) END FROM WidgetInst WHERE WidgetInstId = 6619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6620) END FROM WidgetInst WHERE WidgetInstId = 6620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6621) END FROM WidgetInst WHERE WidgetInstId = 6621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6622) END FROM WidgetInst WHERE WidgetInstId = 6622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6623) END FROM WidgetInst WHERE WidgetInstId = 6623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6624) END FROM WidgetInst WHERE WidgetInstId = 6624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5393) END FROM WidgetInst WHERE WidgetInstId = 5393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5394) END FROM WidgetInst WHERE WidgetInstId = 5394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5395) END FROM WidgetInst WHERE WidgetInstId = 5395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5396) END FROM WidgetInst WHERE WidgetInstId = 5396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5397) END FROM WidgetInst WHERE WidgetInstId = 5397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5398) END FROM WidgetInst WHERE WidgetInstId = 5398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5399) END FROM WidgetInst WHERE WidgetInstId = 5399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6786) END FROM WidgetInst WHERE WidgetInstId = 6786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6787) END FROM WidgetInst WHERE WidgetInstId = 6787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6788) END FROM WidgetInst WHERE WidgetInstId = 6788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6789) END FROM WidgetInst WHERE WidgetInstId = 6789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6790) END FROM WidgetInst WHERE WidgetInstId = 6790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6791) END FROM WidgetInst WHERE WidgetInstId = 6791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6792) END FROM WidgetInst WHERE WidgetInstId = 6792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6786) END FROM WidgetInst WHERE WidgetInstId = 6786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6787) END FROM WidgetInst WHERE WidgetInstId = 6787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6788) END FROM WidgetInst WHERE WidgetInstId = 6788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6789) END FROM WidgetInst WHERE WidgetInstId = 6789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6790) END FROM WidgetInst WHERE WidgetInstId = 6790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6791) END FROM WidgetInst WHERE WidgetInstId = 6791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6792) END FROM WidgetInst WHERE WidgetInstId = 6792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6786) END FROM WidgetInst WHERE WidgetInstId = 6786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6787) END FROM WidgetInst WHERE WidgetInstId = 6787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6788) END FROM WidgetInst WHERE WidgetInstId = 6788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6789) END FROM WidgetInst WHERE WidgetInstId = 6789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6790) END FROM WidgetInst WHERE WidgetInstId = 6790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6791) END FROM WidgetInst WHERE WidgetInstId = 6791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6792) END FROM WidgetInst WHERE WidgetInstId = 6792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6786) END FROM WidgetInst WHERE WidgetInstId = 6786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6787) END FROM WidgetInst WHERE WidgetInstId = 6787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6788) END FROM WidgetInst WHERE WidgetInstId = 6788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6789) END FROM WidgetInst WHERE WidgetInstId = 6789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6790) END FROM WidgetInst WHERE WidgetInstId = 6790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6791) END FROM WidgetInst WHERE WidgetInstId = 6791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6792) END FROM WidgetInst WHERE WidgetInstId = 6792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6940) END FROM WidgetInst WHERE WidgetInstId = 6940) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6941) END FROM WidgetInst WHERE WidgetInstId = 6941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6942) END FROM WidgetInst WHERE WidgetInstId = 6942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6943) END FROM WidgetInst WHERE WidgetInstId = 6943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6944) END FROM WidgetInst WHERE WidgetInstId = 6944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6945) END FROM WidgetInst WHERE WidgetInstId = 6945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6946) END FROM WidgetInst WHERE WidgetInstId = 6946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6940) END FROM WidgetInst WHERE WidgetInstId = 6940) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6961;


